<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/common.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
	<head>	
		<title>工作计划</title>
		<script type="text/javascript" src="<%=contextPath%>/js/validator.js"></script>
		<script type="text/javascript" src="<%=contextPath%>/js/My97DatePicker/WdatePicker.js"></script>
		<script type="text/javascript">
			Ext.onReady(function(){
				var tb = new Ext.Toolbar({
			   		renderTo: document.all.tbar,
			    	items: [
				       {
				            text: '保存',
				            icon:"<%=contextPath%>/images/save.gif",
				            handler:function(){
				            	comt();
				            }
				        },'-',
				         {
				            text: '提交',
				            icon:"<%=contextPath%>/" + "images/pass.gif",
				            handler:function(){
				            	tj();
				            }
				        },'-',
				        
				        {
				            text: '返回',
				            icon:"<%=contextPath%>/images/fanhui.png",
				            handler:function(){
				            	back();
				            }
				        }
			    	]
			    });
			});
			
			function getprojectinfo(){
			window.open("<%=contextPath%>/projectImplement!findByUnitno.do", '统计表格', 'height=300, width=350, top=200, left=300, toolbar=no, menubar=no');
			// document.frmM.action = "<%=contextPath%>/projectImplement!findByUnitno";
			}
		</script>
	</head>
  
  <body topmargin="0">
  <div id = "tbar"></div>
  <center>
			<!-- 信息提示 -->
			<div result><font color="red">${info }</font></div>
		</center>
 		<form id="frmM" class="ct" name="frmM" method="POST" action="<%=contextPath%>/projectImplement!save.do">
 			<input type="hidden" id="hiddenids" name="hiddenids" value="${hiddenids}"/>
			<s:hidden name="entity.id" />
			<s:hidden name="entity.ouid" />
			<s:hidden name="entity.state" />	
			<table width="100%"  id="infotab" >
				<tr>
                  <th width="26%" align="left" >负责人：</th>
				  <td width="8%" ><s:textfield   name="entity.fzr" maxlength="50" size="25" /></td>
				  <th width="27%" align="left" >班组：</th>
				  <td width="3%" ><s:textfield   name="entity.bz" maxlength="50" size="25" /></td>
				</tr>
					<tr>
                  <th width="26%" align="left" >成员：</th>
				  <td width="8%" ><s:textfield   name="entity.cy" maxlength="50" size="25" /></td>
				 
				  <th width="27%" align="left" >变电站：</th>
				  <td width="3%" ><s:textfield   name="entity.bdz" maxlength="50" size="25" /></td>
				</tr>
					<tr>
                  <th width="26%" align="left" >工作范围：</th>
				  <td width="8%" colspan="3"><s:textfield   name="entity.gzfw" maxlength="50" size="25" /></td>
				
				</tr>
				<tr>
                  <th width="26%" align="left" >开始时间：</th>
				  <td width="8%" >	 <s:textfield name="entity.startdate" readonly="true"  datatype="Require" maxlength="50" size="25" msg="开始日期必须输入。" />
				    	 <img onclick="WdatePicker({dateFmt:'yyyy-MM-dd',el:$dp.$('entity.startdate')})" src="<%=contextPath%>/js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle">
				  </td>
				 
				  <th width="27%" align="left" >结束时间：</th>
				  <td width="3%" >	 <s:textfield name="entity.enddate" readonly="true"  datatype="Require" maxlength="50" size="25" msg="开始日期必须输入。" />
				    	 <img onclick="WdatePicker({dateFmt:'yyyy-MM-dd',el:$dp.$('entity.enddate')})" src="<%=contextPath%>/js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle">
				</td>
				</tr>
				  <th width="26%" align="left">到位人员：</th>
				  <td width="8%" ><s:textfield   name="entity.dwry" maxlength="50" size="25" /></td>
				  <th width="27%" align="left">验收人员：</th>
				  <td width="3%" ><s:textfield   name="entity.ysry" maxlength="50" size="25" /></td>
   				</tr>
   				
   					<tr>
					<th align="left" >工作任务：</th>
					<td colspan="3" >
						<textarea name="entity.gzrwtext" style="width:99%; height: 30px; min-height: 20px;line-height:15pt" min="0" datatype="LimitB"  min="1"   max="200"  datatype="Require"  msg="工作项目必须输入。" >${entity.gzrwtext}</textarea></td>
				</tr>
 			<c:if test="${entity.type == 0}">			
				<tr>
                  <th align="left" >工作票号：</th>
				  <td ><s:textfield   name="entity.gzpno" maxlength="50" size="25" /></td>
				  <th align="left" >质量控制卡(指导书)：</th>
				   <td ><s:textfield   name="entity.zlkzk" maxlength="50" size="25" /></td>
				  </tr>
				  <tr>
				  <th align="left" >风险辨识控制卡:</th>
				  <td ><s:textfield   name="entity.fxbskzk" maxlength="50" size="25" /></td>
				  <th align="left">作业控制卡：</th>
				  <td ><s:textfield   name="entity.zykzkno2" maxlength="50" size="25" /></td>
   				</tr>
				<tr>
					<th align="left" >调试报告：</th>
					<td >
						<s:textfield name="entity.tsbg"   size="25"  /></td>
					<th align="left" >台账记录：</th>
					<td >
						<s:textfield   name="entity.tzjlno2" maxlength="50" size="25" /></td></tr>
						
							<tr>
					<th align="left" >同车班组：</th>
					<td >
						<s:textfield name="entity.tcbz"   size="25"  /></td>
					<th align="left" >车辆：</th>
					<td >
						<s:textfield   name="entity.cl" maxlength="50" size="25" /></td></tr>
					<tr>
				    <th align="left">备注：</th>
				    <td  colspan="3"><s:textfield   name="entity.remark" maxlength="50" size="25" /></td>
				  
				</tr>
				</c:if>
				<c:if test="${entity.type == 1}">
						<tr>
					<th align="left" >工作票号：</th>
					<td >
						<s:textfield name="entity.gzpno"  size="25"/></td>
					<th align="left" >作业控制卡：</th>
					<td >
						<s:textfield   name="entity.zykzkno" maxlength="50" size="25" /></td></tr>
						<tr>
						
						
				<tr>
					<th align="left" >台账记录：</th>
					<td >
						<s:textfield name="entity.tzjlno"  size="25"/></td>
					<th align="left" >同车班组：</th>
					<td >
						<s:textfield   name="entity.tcbz" maxlength="50" size="25" /></td></tr>
						<tr>
				    <th align="left">备注：</th>
				    <td  colspan="3"><s:textfield   name="entity.fzr" maxlength="50" size="25" /></td>
				  
				</tr>		 
			</c:if>
 			<c:if test="${entity.type != 0}">	
				<tr>
                  <th align="left" >工作票号：</th>
				  <td ><s:textfield   name="entity.gzpno" maxlength="50" size="25" /></td>
				  <th align="left" >质量控制卡(指导书)：</th>
				   <td ><s:textfield   name="entity.zlkzk" maxlength="50" size="25" /></td>
				  </tr>
				  <tr>
				  <th align="left" >风险辨识控制卡:</th>
				  <td ><s:textfield   name="entity.fxbskzk" maxlength="50" size="25" /></td>
				  <th align="left">作业控制卡：</th>
				  <td ><s:textfield   name="entity.zykzkno2" maxlength="50" size="25" /></td>
   				</tr>
				<tr>
					<th align="left" >调试报告：</th>
					<td >
						<s:textfield name="entity.tsbg"   size="25"  /></td>
					<th align="left" >台账记录：</th>
					<td >
						<s:textfield   name="entity.tzjlno2" maxlength="50" size="25" /></td></tr>
						
							<tr>
					<th align="left" >同车班组：</th>
					<td >
						<s:textfield name="entity.tcbz"   size="25"  /></td>
					<th align="left" >车辆：</th>
					<td >
						<s:textfield   name="entity.cl" maxlength="50" size="25" /></td></tr>
					<tr>
				    <th align="left">备注：</th>
				    <td  colspan="3"><s:textfield   name="entity.remark" maxlength="50" size="25" /></td>
				  
				</tr>
				</c:if>
				
		</table>

   </form>
  </body>
</html>
<script language="javascript">
	 // 保存
     function comt(){
        if(!Validator.Validate(frmM,1)){
			return false;
		}
     	document.frmM.action = "<%=contextPath%>/gzrwdCreatePlan!saveMonthPlan.do";
     	document.frmM.submit();
     }
     function tj (){
  	  	if(confirm("确定要提交吗？")) {
	       	document.frmM.action = "<%=contextPath%>/gzrwdCreatePlan!confirmGzrwd.do?flag= 1";
			document.frmM.submit();
	   	}
     
     
     }
     // 返回
     function back() {
        location.href = "<%=contextPath%>/planList!getList.do?"
     }
 
</script>
